﻿<!DOCTYPE html>
<html ng-app="demoApp" lang="en">
<head>
    <title id='Description'>This demo demonstrates how to AngularJS DateTimeInput's events.</title>
    <meta name="description" content="AngularJS DateTime Input example. This example demonstrates a Date and Time Picker's Events binding." /> 
    <link rel="stylesheet" href="../../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" src="../../../scripts/angular.min.js"></script> <script type="text/javascript" src="../../../scripts/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../../scripts/demos.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxdatetimeinput.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxcalendar.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/jqxtooltip.js"></script>
    <script type="text/javascript" src="../../../jqwidgets/globalization/globalize.js"></script>
      <script type="text/javascript" src="../../../jqwidgets/jqxangular.js"></script>
  
    <script type="text/javascript">
        var demoApp = angular.module("demoApp", ["jqwidgets"]);
        demoApp.controller("demoController", function ($scope) {
            $scope.change = function (event) {
                var date = event.args.date;
                $scope.log = "Change: " + date;
            }
            $scope.open = function (event) {
                $scope.log = "Popup Opened";
            }

            $scope.close = function (event) {
                $scope.log = "Popup Closed";
            }
        });
    </script>
</head>
<body ng-controller="demoController">
    <jqx-date-time-input jqx-width="270" jqx-height="25" jqx-on-open="open(event)" jqx-on-close="close(event)" jqx-on-change="change(event)"></jqx-date-time-input>
    <br />
    <div>Events:</div>
    <div style="font-family: 'segoe ui', arial, sans-serif;">
        {{log}}
    </div>
</body>
</html>
